﻿<Controls.Common:Gadget
    x:Class="Imagin.Gadgets.ClockGadget"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:Imagin.Gadgets"
    xmlns:Common="http://imagin.tech/imagin/common"
    xmlns:Controls.Common="http://imagin.tech/imagin/controls/common"
    mc:Ignorable="d"
    Background="Black"
    MaxHeight="600"
    MinHeight="105"
    MaxWidth="800"
    MinWidth="128"
    SizeToContent="Height"
    Title="Clock"
    Width="325"
    WindowStartupLocation="CenterScreen"
    x:Name="PART_ClockGadget">
    <Border 
        DataContext="{Binding ElementName=PART_ClockGadget}"
        Background="Black"
        Controls.Common:FrameworkElementExtensions.IsDragMoveEnabled="True">
        <Viewbox TextOptions.TextFormattingMode="Ideal">
            <TextBlock 
                FontFamily="pack://application:,,,/Imagin.Gadgets;component/Fonts/#SF Digital Readout"
                FontSize="50"
                Foreground="White"
                Text="{Binding Date, Source={x:Static local:ClockGadget.Date}, StringFormat='{}HH:mm:ss tt'}"/>
        </Viewbox>
    </Border>
</Controls.Common:Gadget>
